import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// 自动导入
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
// Element
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";

// // Elenemt Icon
// import Icons from "unplugin-icons/vite"; // 自定义icon
// import IconsResolver from "unplugin-icons/resolver";

// https://vitejs.dev/config/
const path = require("path");
export default defineConfig({
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
  plugins: [
    vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],
});
